/****************************************************
          File Name:14-3.cpp
          Author: Abby Cin
          Mail: abbytsing@gmail.com
          Created Time: Sat Jan 10 18:32:53 2015
*****************************************************/

#include "14-3.h"
#include <iostream>

int main()
{
    using std::cout;
    using std::cin;
    using std::endl;

    Queue<int> *test[3];

    int in, out;

    for(int i=0; i<3; i++)
    {
        test[i] = new Queue<int>(3);        // is of paramout importance !!!
        std::cout << "now enter the " << i+1 <<  "th member\n";
        while(!test[i]->isfull())
        {
            std::cout << "Enter a number to enqueue: ";
            std::cin >> in;
            test[i]->enqueue(in);
        }
    }

    for(int i=0; i<3; i++)
    {
        std::cout << "\nnow pop the "  << i+1 << "th member\n";
        while(!test[i]->isempty())
        {
            test[i]->dequeue(out);
            std::cout << out << std::endl;
        }
    }

    return 0;
}
